<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
.AlignLeft { text-align: left; }
.AlignCenter { text-align: center; }
.AlignRight { text-align: right; }
body { font-family: sans-serif; font-size: 11pt; }
img.AutoScale { max-width: 100%; max-height: 100%; }
td { vertical-align: top; padding-left: 4px; padding-right: 4px; }

tr.SectionGap td { font-size: 4px; border-left: none; border-top: none; border-bottom: 1px solid Black; border-right: 1px solid Black; }
tr.SectionAll td { border-left: none; border-top: none; border-bottom: 1px solid Black; border-right: 1px solid Black; }
tr.SectionBegin td { border-left: none; border-top: none; border-right: 1px solid Black; }
tr.SectionEnd td { border-left: none; border-top: none; border-bottom: 1px solid Black; border-right: 1px solid Black; }
tr.SectionMiddle td { border-left: none; border-top: none; border-right: 1px solid Black; }
tr.SubsectionAll td { border-left: none; border-top: none; border-bottom: 1px solid Gray; border-right: 1px solid Black; }
tr.SubsectionEnd td { border-left: none; border-top: none; border-bottom: 1px solid Gray; border-right: 1px solid Black; }
table.fc { border-top: 1px solid Black; border-left: 1px solid Black; width: 100%; font-family: monospace; font-size: 10pt; }
td.TextItemInsigMod { color: #000000; background-color: #EEEEFF; }
td.TextItemInsigOrphan { color: #000000; background-color: #FAEEFF; }
td.TextItemNum { color: #696969; background-color: #F0F0F0; }
td.TextItemSame { color: #000000; background-color: #FFFFFF; }
td.TextItemSigMod { color: #000000; background-color: #FFE3E3; }
td.TextItemSigOrphan { color: #000000; background-color: #F1E3FF; }
.TextSegInsigDiff { color: #0000FF; }
.TextSegReplacedDiff { color: #0000FF; font-style: italic; }
.TextSegSigDiff { color: #FF0000; }
td.TextItemInsigAdd { color: #000000; background-color: #EEEEFF; }
td.TextItemInsigDel { color: #000000; background-color: #EEEEFF; text-decoration: line-through; }
td.TextItemSigAdd { color: #000000; background-color: #FFE3E3; }
td.TextItemSigDel { color: #000000; background-color: #FFE3E3; text-decoration: line-through; }
.TextSegElementKeyword { font-weight: bold; }
.TextSegElementIdentifier { }
.TextSegElementNumber { color: #2E9269; }
.TextSegElementString { color: #3A7726; }
.TextSegElementCompiler_32Directive { color: #681717; }
.TextSegElementComment { color: #786A41; }
.TextSegElementOperator { }
</style>
<title>Compare Windows-driver-samples\usb\kmdf_fx2 to DMF\DmfSamples\kmdf_fx2_dmf</title>
</head>
<body>
Compare Windows-driver-samples\usb\kmdf_fx2 to DMF\DmfSamples\kmdf_fx2_dmf<br>
Produced: 8/20/2020 11:07:03 AM<br>
&nbsp; &nbsp;
<br>
Mode:&nbsp; All &nbsp;
<br>
Left file: Windows-driver-samples\usb\kmdf_fx2\exe\testapp.c &nbsp;
<br>
Right file: DMF\DmfSamples\kmdf_fx2_dmf\exe\testapp.c &nbsp;
<br>
<table class="fc" cellspacing="0" cellpadding="0">
<tr class="SectionBegin">
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
<td class="AlignCenter">=</td>
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Copyright (c) Microsoft Corporation.&nbsp; All rights reserved.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Copyright (c) Microsoft Corporation.&nbsp; All rights reserved.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; THIS CODE AND INFORMATION IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; THIS CODE AND INFORMATION IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; PURPOSE.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; PURPOSE.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Module Name:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Module Name:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; TESTAPP.C</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; TESTAPP.C</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Abstract:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Abstract:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Console test app for osrusbfx2 driver.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Console test app for osrusbfx2 driver.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Environment:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Environment:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; user mode only</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; user mode only</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">DriverSpecs</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">DriverSpecs</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Analysis_mode_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">_Analysis_code_type_user_code_</span><span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Analysis_mode_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">_Analysis_code_type_user_code_</span><span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">windows</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">windows</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">stdio</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">stdio</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">stdlib</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">stdlib</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementString">&quot;devioctl.h&quot;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementString">&quot;devioctl.h&quot;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementString">&quot;strsafe.h&quot;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementString">&quot;strsafe.h&quot;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4200</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4200</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4201</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementComment">// nameless struct/union</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4201</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementComment">// nameless struct/union</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4214</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementComment">// bit field types other than int</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4214</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementComment">// bit field types other than int</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">cfgmgr32</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">cfgmgr32</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">basetyps</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">basetyps</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">h</span><span class="TextSegElementOperator">&gt;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementString">&quot;usbdi.h&quot;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementString">&quot;usbdi.h&quot;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementString">&quot;public.h&quot;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#include</span> <span class="TextSegElementString">&quot;public.h&quot;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4200</span><span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4200</span><span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4201</span><span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4201</span><span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4214</span><span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4214</span><span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">WHILE</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">a</span><span class="TextSegElementOperator">)</span> \</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">WHILE</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">a</span><span class="TextSegElementOperator">)</span> \</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">while</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">__pragma</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4127</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementIdentifier">a</span> <span class="TextSegElementIdentifier">__pragma</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4127</span><span class="TextSegElementOperator">)))</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">while</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">__pragma</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4127</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementIdentifier">a</span> <span class="TextSegElementIdentifier">__pragma</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">disable</span><span class="TextSegElementOperator">:</span><span class="TextSegElementNumber">4127</span><span class="TextSegElementOperator">)))</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">MAX_DEVPATH_LENGTH</span> <span class="TextSegElementNumber">256</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">MAX_DEVPATH_LENGTH</span> <span class="TextSegElementNumber">256</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span>&nbsp;&nbsp; <span class="TextSegElementNumber">100</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span>&nbsp;&nbsp; <span class="TextSegElementNumber">100</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span>&nbsp; &nbsp;&nbsp; <span class="TextSegElementNumber">1024</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span>&nbsp; &nbsp;&nbsp; <span class="TextSegElementNumber">1024</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">READER_TYPE</span>&nbsp;&nbsp; <span class="TextSegElementNumber">1</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">READER_TYPE</span>&nbsp;&nbsp; <span class="TextSegElementNumber">1</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">WRITER_TYPE</span>&nbsp;&nbsp; <span class="TextSegElementNumber">2</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">WRITER_TYPE</span>&nbsp;&nbsp; <span class="TextSegElementNumber">2</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fDumpUsbConfig</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span>&nbsp; &nbsp; <span class="TextSegElementComment">// flags set in response to console command line switches</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fDumpUsbConfig</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span>&nbsp; &nbsp; <span class="TextSegElementComment">// flags set in response to console command line switches</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fRead</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fRead</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fPlayWithDevice</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fPlayWithDevice</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fPerformAsyncIo</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">G_fPerformAsyncIo</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">G_IterationCount</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementComment">//count of iterations of the test we are to perform</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">G_IterationCount</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementComment">//count of iterations of the test we are to perform</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">G_WriteLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">512</span><span class="TextSegElementOperator">;</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// #bytes to write</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">G_WriteLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">512</span><span class="TextSegElementOperator">;</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// #bytes to write</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">G_ReadLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">512</span><span class="TextSegElementOperator">;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// #bytes to read</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">G_ReadLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">512</span><span class="TextSegElementOperator">;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// #bytes to read</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">DumpUsbConfig</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementComment">// defined in dump.c</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">DumpUsbConfig</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementComment">// defined in dump.c</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">typedef</span> <span class="TextSegElementKeyword">enum</span> <span class="TextSegElementIdentifier">_INPUT_FUNCTION</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">typedef</span> <span class="TextSegElementKeyword">enum</span> <span class="TextSegElementIdentifier">_INPUT_FUNCTION</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">LIGHT_ONE_BAR</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">LIGHT_ONE_BAR</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">CLEAR_ONE_BAR</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">CLEAR_ONE_BAR</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">LIGHT_ALL_BARS</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">LIGHT_ALL_BARS</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">CLEAR_ALL_BARS</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">CLEAR_ALL_BARS</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">GET_BAR_GRAPH_LIGHT_STATE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">GET_BAR_GRAPH_LIGHT_STATE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">GET_SWITCH_STATE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">GET_SWITCH_STATE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">GET_SWITCH_STATE_AS_INTERRUPT_MESSAGE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">GET_SWITCH_STATE_AS_INTERRUPT_MESSAGE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">GET_7_SEGEMENT_STATE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">GET_7_SEGEMENT_STATE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">SET_7_SEGEMENT_STATE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">SET_7_SEGEMENT_STATE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">RESET_DEVICE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">RESET_DEVICE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">REENUMERATE_DEVICE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">REENUMERATE_DEVICE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span> <span class="TextSegElementIdentifier">INPUT_FUNCTION</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span> <span class="TextSegElementIdentifier">INPUT_FUNCTION</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Success_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">return</span><span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Success_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">return</span><span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">GetDevicePath</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">GetDevicePath</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span>&nbsp; <span class="TextSegElementIdentifier">LPGUID</span> <span class="TextSegElementIdentifier">InterfaceGuid</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span>&nbsp; <span class="TextSegElementIdentifier">LPGUID</span> <span class="TextSegElementIdentifier">InterfaceGuid</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_Out_writes_z_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BufLen</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">PWCHAR</span> <span class="TextSegElementIdentifier">DevicePath</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_Out_writes_z_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BufLen</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">PWCHAR</span> <span class="TextSegElementIdentifier">DevicePath</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementIdentifier">size_t</span> <span class="TextSegElementIdentifier">BufLen</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementIdentifier">size_t</span> <span class="TextSegElementIdentifier">BufLen</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">CONFIGRET</span> <span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CR_SUCCESS</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">CONFIGRET</span> <span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CR_SUCCESS</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PWSTR</span> <span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PWSTR</span> <span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">deviceInterfaceListLength</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">deviceInterfaceListLength</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PWSTR</span> <span class="TextSegElementIdentifier">nextInterface</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PWSTR</span> <span class="TextSegElementIdentifier">nextInterface</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HRESULT</span> <span class="TextSegElementIdentifier">hr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">E_FAIL</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HRESULT</span> <span class="TextSegElementIdentifier">hr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">E_FAIL</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CM_Get_Device_Interface_List_Size</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CM_Get_Device_Interface_List_Size</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">deviceInterfaceListLength</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">deviceInterfaceListLength</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">InterfaceGuid</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">InterfaceGuid</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CM_GET_DEVICE_INTERFACE_LIST_PRESENT</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CM_GET_DEVICE_INTERFACE_LIST_PRESENT</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">CR_SUCCESS</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">CR_SUCCESS</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error 0x%x retrieving device interface list size.\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">cr</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error 0x%x retrieving device interface list size.\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">cr</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceListLength</span> <span class="TextSegElementOperator">&lt;=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceListLength</span> <span class="TextSegElementOperator">&lt;=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error: No active device interfaces found.\n&quot;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error: No active device interfaces found.\n&quot;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementString">&quot; Is the sample driver loaded?&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementString">&quot; Is the sample driver loaded?&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PWSTR</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceListLength</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">WCHAR</span><span class="TextSegElementOperator">));</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PWSTR</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceListLength</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">WCHAR</span><span class="TextSegElementOperator">));</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error allocating memory for device interface list.\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error allocating memory for device interface list.\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ZeroMemory</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">deviceInterfaceListLength</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">WCHAR</span><span class="TextSegElementOperator">));</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ZeroMemory</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">deviceInterfaceListLength</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">WCHAR</span><span class="TextSegElementOperator">));</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CM_Get_Device_Interface_List</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CM_Get_Device_Interface_List</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">InterfaceGuid</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">InterfaceGuid</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">deviceInterfaceListLength</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">deviceInterfaceListLength</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CM_GET_DEVICE_INTERFACE_LIST_PRESENT</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CM_GET_DEVICE_INTERFACE_LIST_PRESENT</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">CR_SUCCESS</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">cr</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">CR_SUCCESS</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error 0x%x retrieving device interface list.\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">cr</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error 0x%x retrieving device interface list.\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">cr</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">nextInterface</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementIdentifier">wcslen</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">nextInterface</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementIdentifier">wcslen</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(*</span><span class="TextSegElementIdentifier">nextInterface</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">UNICODE_NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(*</span><span class="TextSegElementIdentifier">nextInterface</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">UNICODE_NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Warning: More than one device interface instance found. \n&quot;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Warning: More than one device interface instance found. \n&quot;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementString">&quot;Selecting first matching device.\n\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementString">&quot;Selecting first matching device.\n\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">hr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">StringCchCopy</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">DevicePath</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">BufLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">hr</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">StringCchCopy</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">DevicePath</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">BufLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">FAILED</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hr</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">FAILED</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hr</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error: StringCchCopy failed with HRESULT 0x%x&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">hr</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error: StringCchCopy failed with HRESULT 0x%x&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">hr</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">clean0</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceInterfaceList</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">CR_SUCCESS</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">cr</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">CR_SUCCESS</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">cr</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bRet</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">bRet</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">bRet</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Check_return_</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Check_return_</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Ret_notnull_</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Ret_notnull_</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Success_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">return</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">_Success_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">return</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">HANDLE</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">HANDLE</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">Synchronous</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementKeyword">BOOL</span> <span class="TextSegElementIdentifier">Synchronous</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called by main() to open an instance of our device after obtaining its name</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called by main() to open an instance of our device after obtaining its name</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Synchronous - TRUE, if Device is to be opened for synchronous access.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Synchronous - TRUE, if Device is to be opened for synchronous access.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; FALSE, otherwise.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; FALSE, otherwise.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Device handle on success else INVALID_HANDLE_VALUE</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Device handle on success else INVALID_HANDLE_VALUE</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hDev</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hDev</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">WCHAR</span> <span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">MAX_DEVPATH_LENGTH</span><span class="TextSegElementOperator">];</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">WCHAR</span> <span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">MAX_DEVPATH_LENGTH</span><span class="TextSegElementOperator">];</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementOperator">!</span><span class="TextSegElementIdentifier">GetDevicePath</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementOperator">!</span><span class="TextSegElementIdentifier">GetDevicePath</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">LPGUID</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">GUID_DEVINTERFACE_OSRUSBFX2</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">LPGUID</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">GUID_DEVINTERFACE_OSRUSBFX2</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">)/</span><span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">[</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]))</span> <span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">)/</span><span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">[</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]))</span> <span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">return</span>&nbsp; <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">return</span>&nbsp; <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceName = (%S)\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceName = (%S)\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">Synchronous</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">Synchronous</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">hDev</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CreateFile</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">hDev</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CreateFile</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">GENERIC_WRITE</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">GENERIC_READ</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">GENERIC_WRITE</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">GENERIC_READ</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">FILE_SHARE_WRITE</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">FILE_SHARE_READ</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">FILE_SHARE_WRITE</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">FILE_SHARE_READ</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementComment">// default security</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementComment">// default security</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">OPEN_EXISTING</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">OPEN_EXISTING</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">FILE_ATTRIBUTE_NORMAL</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">FILE_ATTRIBUTE_NORMAL</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">hDev</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CreateFile</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">hDev</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CreateFile</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">completeDeviceName</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">GENERIC_WRITE</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">GENERIC_READ</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">GENERIC_WRITE</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">GENERIC_READ</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">FILE_SHARE_WRITE</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">FILE_SHARE_READ</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">FILE_SHARE_WRITE</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">FILE_SHARE_READ</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementComment">// default security</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementComment">// default security</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">OPEN_EXISTING</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">OPEN_EXISTING</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">FILE_ATTRIBUTE_NORMAL</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">FILE_FLAG_OVERLAPPED</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">FILE_ATTRIBUTE_NORMAL</span> <span class="TextSegElementOperator">|</span> <span class="TextSegElementIdentifier">FILE_FLAG_OVERLAPPED</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDev</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDev</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Failed to open the device, error - %d&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Failed to open the device, error - %d&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Opened the device successfully.\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Opened the device successfully.\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">hDev</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">hDev</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">VOID</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">VOID</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">()</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">()</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called by main() to dump usage info to the console when</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called by main() to dump usage info to the console when</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; the app is called with no parms or with an invalid parm</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; the app is called with no parms or with an invalid parm</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; None</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; None</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; None</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; None</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Usage for osrusbfx2 testapp:\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Usage for osrusbfx2 testapp:\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-r [n] where n is number of bytes to read\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-r [n] where n is number of bytes to read\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-w [n] where n is number of bytes to write\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-w [n] where n is number of bytes to write\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-c [n] where n is number of iterations (default = 1)\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-c [n] where n is number of iterations (default = 1)\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-v verbose -- dumps read data\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-v verbose -- dumps read data\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-p to control bar LEDs, seven segment, and dip switch\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-p to control bar LEDs, seven segment, and dip switch\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-a to perform asynchronous I/O\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-a to perform asynchronous I/O\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-u to dump USB configuration and pipe info \n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;-u to dump USB configuration and pipe info \n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">void</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">void</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">Parse</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">Parse</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_reads_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">LPSTR</span>&nbsp; <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">argv</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_reads_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">LPSTR</span>&nbsp; <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">argv</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called by main() to parse command line parms</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called by main() to parse command line parms</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; argc and argv that was passed to main()</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; argc and argv that was passed to main()</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Sets global flags as per user function request</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Sets global flags as per user function request</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">argc</span> <span class="TextSegElementOperator">&lt;</span> <span class="TextSegElementNumber">2</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementComment">// give usage if invoked with no parms</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">argc</span> <span class="TextSegElementOperator">&lt;</span> <span class="TextSegElementNumber">2</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementComment">// give usage if invoked with no parms</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">=</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">=</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementString">'-'</span> <span class="TextSegElementOperator">||</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementString">'-'</span> <span class="TextSegElementOperator">||</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementString">'/'</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementString">'/'</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">switch</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">])</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">switch</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">])</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'r'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'r'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'R'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'R'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&gt;=</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&gt;=</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">suppress</span><span class="TextSegElementOperator">:</span> <span class="TextSegElementNumber">6385</span><span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#pragma</span> <span class="TextSegElementIdentifier">warning</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">suppress</span><span class="TextSegElementOperator">:</span> <span class="TextSegElementNumber">6385</span><span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_ReadLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">atoi</span><span class="TextSegElementOperator">(&amp;</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_ReadLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">atoi</span><span class="TextSegElementOperator">(&amp;</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fRead</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fRead</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'w'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'w'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'W'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'W'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&gt;=</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&gt;=</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_WriteLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">atoi</span><span class="TextSegElementOperator">(&amp;</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_WriteLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">atoi</span><span class="TextSegElementOperator">(&amp;</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'c'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'c'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'C'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'C'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&gt;=</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&gt;=</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_IterationCount</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">atoi</span><span class="TextSegElementOperator">(&amp;</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_IterationCount</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">atoi</span><span class="TextSegElementOperator">(&amp;</span><span class="TextSegElementIdentifier">argv</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">+</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">][</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">]);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'u'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'u'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'U'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'U'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fDumpUsbConfig</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fDumpUsbConfig</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'p'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'p'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'P'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'P'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fPlayWithDevice</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fPlayWithDevice</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'a'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'a'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'A'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'A'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fPerformAsyncIo</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fPerformAsyncIo</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'v'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'v'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'V'</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementString">'V'</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Usage</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">Compare_Buffs</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">Compare_Buffs</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_reads_bytes_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buff1length</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementKeyword">char</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">buff1</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_reads_bytes_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buff1length</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementKeyword">char</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">buff1</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">buff1length</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">buff1length</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_reads_bytes_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buff2length</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementKeyword">char</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">buff2</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_reads_bytes_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buff2length</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementKeyword">char</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">buff2</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">buff2length</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">buff2length</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called to verify read and write buffers match for loopback test</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called to verify read and write buffers match for loopback test</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; buffers to compare and length</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; buffers to compare and length</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; TRUE if buffers match, else FALSE</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; TRUE if buffers match, else FALSE</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">ok</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">ok</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buff1length</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">buff2length</span> <span class="TextSegElementOperator">||</span> <span class="TextSegElementIdentifier">memcmp</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buff1</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">buff2</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">buff1length</span> <span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buff1length</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">buff2length</span> <span class="TextSegElementOperator">||</span> <span class="TextSegElementIdentifier">memcmp</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buff1</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">buff2</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">buff1length</span> <span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Edi, and Esi point to the mismatching char and ecx indicates the</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Edi, and Esi point to the mismatching char and ecx indicates the</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// remaining length.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// remaining length.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ok</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ok</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">ok</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">ok</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">NPERLN</span> <span class="TextSegElementNumber">8</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementCompiler_32Directive">#define</span> <span class="TextSegElementIdentifier">NPERLN</span> <span class="TextSegElementNumber">8</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">VOID</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">VOID</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">Dump</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">Dump</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; <span class="TextSegElementIdentifier">UCHAR</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">b</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; <span class="TextSegElementIdentifier">UCHAR</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">b</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">len</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">len</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called to do formatted ascii dump to console of the io buffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Called to do formatted ascii dump to console of the io buffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; buffer and length</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; buffer and length</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; none</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; none</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">longLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ULONG</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">len</span> <span class="TextSegElementOperator">/</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementIdentifier">longLen</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ULONG</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">len</span> <span class="TextSegElementOperator">/</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PULONG</span> <span class="TextSegElementIdentifier">pBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PULONG</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">b</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PULONG</span> <span class="TextSegElementIdentifier">pBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PULONG</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">b</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// dump an ordinal ULONG for each sizeof(ULONG)'th byte</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// dump an ordinal ULONG for each sizeof(ULONG)'th byte</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n****** BEGIN DUMP LEN decimal %d, 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">len</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">len</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n****** BEGIN DUMP LEN decimal %d, 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">len</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">len</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">=</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">longLen</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">=</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">longLen</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%04X &quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">pBuf</span><span class="TextSegElementOperator">++);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%04X &quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">pBuf</span><span class="TextSegElementOperator">++);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> % <span class="TextSegElementIdentifier">NPERLN</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">NPERLN</span> <span class="TextSegElementOperator">-</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> % <span class="TextSegElementIdentifier">NPERLN</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">NPERLN</span> <span class="TextSegElementOperator">-</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> % <span class="TextSegElementIdentifier">NPERLN</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> % <span class="TextSegElementIdentifier">NPERLN</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n****** END DUMP LEN decimal %d, 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">len</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">len</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n****** END DUMP LEN decimal %d, 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">len</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">len</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">BOOL</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">PlayWithDevice</span><span class="TextSegElementOperator">()</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">PlayWithDevice</span><span class="TextSegElementOperator">()</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">DWORD</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">DWORD</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">INPUT_FUNCTION</span>&nbsp; <span class="TextSegElementIdentifier">function</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">INPUT_FUNCTION</span>&nbsp; <span class="TextSegElementIdentifier">function</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">SWITCH_STATE</span>&nbsp; &nbsp; <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">SWITCH_STATE</span>&nbsp; &nbsp; <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">UCHAR</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">sevenSegment</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">UCHAR</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">sevenSegment</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">UCHAR</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">UCHAR</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">BOOL</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">result</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">BOOL</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">result</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">deviceHandle</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">deviceHandle</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Unable to find any OSR FX2 devices!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Unable to find any OSR FX2 devices!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// Infinitely print out the list of choices, ask for input, process</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// Infinitely print out the list of choices, ask for input, process</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// the request</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// the request</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">WHILE</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">WHILE</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\nUSBFX TEST -- Functions:\n\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\nUSBFX TEST -- Functions:\n\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t1.&nbsp; Light Bar\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t1.&nbsp; Light Bar\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t2.&nbsp; Clear Bar\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t2.&nbsp; Clear Bar\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t3.&nbsp; Light entire Bar graph\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t3.&nbsp; Light entire Bar graph\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t4.&nbsp; Clear entire Bar graph\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t4.&nbsp; Clear entire Bar graph\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t5.&nbsp; Get bar graph state\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t5.&nbsp; Get bar graph state\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t6.&nbsp; Get Switch state\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t6.&nbsp; Get Switch state\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t7.&nbsp; Get Switch Interrupt Message\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t7.&nbsp; Get Switch Interrupt Message\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t8.&nbsp; Get 7 segment state\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t8.&nbsp; Get 7 segment state\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t9.&nbsp; Set 7 segment state\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t9.&nbsp; Set 7 segment state\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t10. Reset the device\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t10. Reset the device\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t11. Reenumerate the device\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\t11. Reenumerate the device\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n\t0. Exit\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n\t0. Exit\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n\tSelection: &quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;\n\tSelection: &quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">scanf_s</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%d&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">function</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">&lt;=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">scanf_s</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%d&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">function</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">&lt;=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error reading input!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error reading input!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">switch</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">function</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">switch</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">function</span><span class="TextSegElementOperator">)</span>&nbsp; <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">LIGHT_ONE_BAR</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">LIGHT_ONE_BAR</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Which Bar (input number 1 thru 8)?\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Which Bar (input number 1 thru 8)?\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">scanf_s</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%d&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">&lt;=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">scanf_s</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%d&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">&lt;=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error reading input!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error reading input!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">bar</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span> <span class="TextSegElementOperator">||</span> <span class="TextSegElementIdentifier">bar</span> <span class="TextSegElementOperator">&gt;</span> <span class="TextSegElementNumber">8</span><span class="TextSegElementOperator">){</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">bar</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span> <span class="TextSegElementOperator">||</span> <span class="TextSegElementIdentifier">bar</span> <span class="TextSegElementOperator">&gt;</span> <span class="TextSegElementNumber">8</span><span class="TextSegElementOperator">){</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Invalid bar number!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Invalid bar number!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">--;</span> <span class="TextSegElementComment">// normalize to 0 to 7</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">--;</span> <span class="TextSegElementComment">// normalize to 0 to 7</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&lt;&lt;</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">UCHAR</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&lt;&lt;</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">UCHAR</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">CLEAR_ONE_BAR</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">CLEAR_ONE_BAR</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Which Bar (input number 1 thru 8)?\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Which Bar (input number 1 thru 8)?\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">scanf_s</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%d&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">&lt;=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">scanf_s</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%d&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">&lt;=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error reading input!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Error reading input!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">bar</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span> <span class="TextSegElementOperator">||</span> <span class="TextSegElementIdentifier">bar</span> <span class="TextSegElementOperator">&gt;</span> <span class="TextSegElementNumber">8</span><span class="TextSegElementOperator">){</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">bar</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span> <span class="TextSegElementOperator">||</span> <span class="TextSegElementIdentifier">bar</span> <span class="TextSegElementOperator">&gt;</span> <span class="TextSegElementNumber">8</span><span class="TextSegElementOperator">){</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Invalid bar number!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Invalid bar number!\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">--;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">--;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Read the current state</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Read the current state</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_GET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_GET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">&amp;</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&lt;&lt;</span> <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">&amp;</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&lt;&lt;</span> <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Bar is set...Clearing it\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Bar is set...Clearing it\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">&amp;=</span> ~<span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&lt;&lt;</span> <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">&amp;=</span> ~<span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&lt;&lt;</span> <span class="TextSegElementIdentifier">bar</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span> <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span> <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Bar not set.\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Bar not set.\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">LIGHT_ALL_BARS</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">LIGHT_ALL_BARS</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0xFF</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0xFF</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp;&nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp;&nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">CLEAR_ALL_BARS</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">CLEAR_ALL_BARS</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">GET_BAR_GRAPH_LIGHT_STATE</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">GET_BAR_GRAPH_LIGHT_STATE</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">BarsAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_GET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_GET_BAR_GRAPH_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span> <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">BAR_GRAPH_STATE</span><span class="TextSegElementOperator">),</span> <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Bar Graph: \n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Bar Graph: \n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar8 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar8</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar8 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar8</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar7 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar7</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar7 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar7</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar6 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar6</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar6 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar6</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar5 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar5</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar5 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar5</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar4 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar4</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar4 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar4</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar3 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar3</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar3 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar3</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar2 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar2</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar2 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar2</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar1 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar1</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Bar1 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">barGraphState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Bar1</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">GET_SWITCH_STATE</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">GET_SWITCH_STATE</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">SwitchesAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">SwitchesAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_READ_SWITCHES</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_READ_SWITCHES</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">SWITCH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">SWITCH_STATE</span><span class="TextSegElementOperator">),</span>&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Switches: \n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Switches: \n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch8 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch8</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch8 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch8</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch7 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch7</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch7 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch7</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch6 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch6</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch6 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch6</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch5 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch5</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch5 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch5</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch4 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch4</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch4 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch4</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch3 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch3</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch3 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch3</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch2 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch2</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch2 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch2</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch1 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch1</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch1 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch1</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">GET_SWITCH_STATE_AS_INTERRUPT_MESSAGE</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">GET_SWITCH_STATE_AS_INTERRUPT_MESSAGE</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">SwitchesAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">SwitchesAsUChar</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_GET_INTERRUPT_MESSAGE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_GET_INTERRUPT_MESSAGE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">),</span>&nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">),</span>&nbsp; &nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Switches: %d\n&quot;</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Switches: %d\n&quot;</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch8 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch8</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch8 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch8</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch7 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch7</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch7 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch7</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch6 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch6</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch6 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch6</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch5 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch5</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch5 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch5</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch4 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch4</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch4 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch4</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch3 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch3</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch3 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch3</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch2 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch2</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch2 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch2</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch1 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch1</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;&nbsp; &nbsp; Switch1 is %s\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">switchState</span><span class="TextSegElementOperator">.</span><span class="TextSegElementIdentifier">Switch1</span> <span class="TextSegElementOperator">?</span> <span class="TextSegElementString">&quot;ON&quot;</span> <span class="TextSegElementOperator">:</span> <span class="TextSegElementString">&quot;OFF&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">GET_7_SEGEMENT_STATE</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">GET_7_SEGEMENT_STATE</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">sevenSegment</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">sevenSegment</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_GET_7_SEGMENT_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_GET_7_SEGMENT_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">sevenSegment</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">sevenSegment</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">UCHAR</span><span class="TextSegElementOperator">),</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">UCHAR</span><span class="TextSegElementOperator">),</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;7 Segment mask:&nbsp; 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">sevenSegment</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;7 Segment mask:&nbsp; 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">sevenSegment</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">SET_7_SEGEMENT_STATE</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">SET_7_SEGEMENT_STATE</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">&lt;</span> <span class="TextSegElementNumber">8</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">&lt;</span> <span class="TextSegElementNumber">8</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">sevenSegment</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&lt;&lt;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">sevenSegment</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span> <span class="TextSegElementOperator">&lt;&lt;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_7_SEGMENT_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_SET_7_SEGMENT_DISPLAY</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">sevenSegment</span><span class="TextSegElementOperator">,</span>&nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">sevenSegment</span><span class="TextSegElementOperator">,</span>&nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">UCHAR</span><span class="TextSegElementOperator">),</span>&nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">UCHAR</span><span class="TextSegElementOperator">),</span>&nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;This is %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;This is %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Sleep</span><span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">500</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Sleep</span><span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">500</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;7 Segment mask:&nbsp; 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">sevenSegment</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;7 Segment mask:&nbsp; 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">sevenSegment</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">RESET_DEVICE</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">RESET_DEVICE</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Reset the device\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Reset the device\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_RESET_DEVICE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_RESET_DEVICE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">break</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">REENUMERATE_DEVICE</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">case</span> <span class="TextSegElementIdentifier">REENUMERATE_DEVICE</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Re-enumerate the device\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Re-enumerate the device\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(!</span><span class="TextSegElementIdentifier">DeviceIoControl</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_REENUMERATE_DEVICE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">IOCTL_OSRUSBFX2_REENUMERATE_DEVICE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Length of InBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Ptr to OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Length of OutBuffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">index</span><span class="TextSegElementOperator">,</span>&nbsp;&nbsp; <span class="TextSegElementComment">// BytesReturned</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Ptr to Overlapped structure</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">code</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;DeviceIoControl failed with error 0x%x\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">code</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Close the handle to the device and exit out so that</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Close the handle to the device and exit out so that</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// the driver can unload when the device is surprise-removed</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// the driver can unload when the device is surprise-removed</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// and reenumerated.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// and reenumerated.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">default</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">result</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">result</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span>&nbsp;&nbsp; <span class="TextSegElementComment">// end of while loop</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span>&nbsp;&nbsp; <span class="TextSegElementComment">// end of while loop</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">deviceHandle</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">result</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">result</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">ULONG</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">ULONG</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">AsyncIo</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">AsyncIo</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PVOID</span>&nbsp; <span class="TextSegElementIdentifier">ThreadParameter</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PVOID</span>&nbsp; <span class="TextSegElementIdentifier">ThreadParameter</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hDevice</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hDevice</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hCompletionPort</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hCompletionPort</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">OVERLAPPED</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">pOvList</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">OVERLAPPED</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">pOvList</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PUCHAR</span>&nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">PUCHAR</span>&nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG_PTR</span>&nbsp; &nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG_PTR</span>&nbsp; &nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp;&nbsp; <span class="TextSegElementIdentifier">ioType</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ULONG</span><span class="TextSegElementOperator">)(</span><span class="TextSegElementIdentifier">ULONG_PTR</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">ThreadParameter</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp;&nbsp; <span class="TextSegElementIdentifier">ioType</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ULONG</span><span class="TextSegElementOperator">)(</span><span class="TextSegElementIdentifier">ULONG_PTR</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">ThreadParameter</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp;&nbsp; <span class="TextSegElementKeyword">error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp;&nbsp; <span class="TextSegElementKeyword">error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">hDevice</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">hDevice</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">FALSE</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDevice</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDevice</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Cannot open device %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Cannot open device %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">hCompletionPort</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CreateIoCompletionPort</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">hCompletionPort</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CreateIoCompletionPort</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hCompletionPort</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hCompletionPort</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Cannot open completion port %d \n&quot;</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Cannot open completion port %d \n&quot;</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">pOvList</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">OVERLAPPED</span> <span class="TextSegElementOperator">*)</span><span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">OVERLAPPED</span><span class="TextSegElementOperator">));</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">pOvList</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">OVERLAPPED</span> <span class="TextSegElementOperator">*)</span><span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">OVERLAPPED</span><span class="TextSegElementOperator">));</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pOvList</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pOvList</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Cannot allocate overlapped array \n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Cannot allocate overlapped array \n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PUCHAR</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PUCHAR</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Cannot allocate buffer \n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Cannot allocate buffer \n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ZeroMemory</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">OVERLAPPED</span><span class="TextSegElementOperator">));</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ZeroMemory</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">OVERLAPPED</span><span class="TextSegElementOperator">));</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ZeroMemory</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ZeroMemory</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// Issue asynch I/O</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// Issue asynch I/O</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">&lt;</span> <span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">&lt;</span> <span class="TextSegElementIdentifier">NUM_ASYNCH_IO</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ioType</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">READER_TYPE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ioType</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">READER_TYPE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ReadFile</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ReadFile</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">),</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">),</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">])</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">])</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">ERROR_IO_PENDING</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">ERROR_IO_PENDING</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot; %Iu th read failed %d \n&quot;</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot; %Iu th read failed %d \n&quot;</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">WriteFile</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">WriteFile</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">),</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">),</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">])</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">[</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">])</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">ERROR_IO_PENDING</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">ERROR_IO_PENDING</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot; %Iu th write failed %d \n&quot;</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot; %Iu th write failed %d \n&quot;</span><span class="TextSegElementOperator">,</span><span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// Wait for the I/Os to complete. If one completes then reissue the I/O</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// Wait for the I/Os to complete. If one completes then reissue the I/O</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">WHILE</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">WHILE</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">OVERLAPPED</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">completedOv</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">OVERLAPPED</span> <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">completedOv</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG_PTR</span>&nbsp;&nbsp; <span class="TextSegElementIdentifier">key</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG_PTR</span>&nbsp;&nbsp; <span class="TextSegElementIdentifier">key</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">numberOfBytesTransferred</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">numberOfBytesTransferred</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">GetQueuedCompletionStatus</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hCompletionPort</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">numberOfBytesTransferred</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">GetQueuedCompletionStatus</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hCompletionPort</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">numberOfBytesTransferred</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">key</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">completedOv</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">INFINITE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">key</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">completedOv</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">INFINITE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;GetQueuedCompletionStatus failed %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;GetQueuedCompletionStatus failed %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Read successfully completed. Issue another one.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Read successfully completed. Issue another one.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ioType</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">READER_TYPE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ioType</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">READER_TYPE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">completedOv</span> <span class="TextSegElementOperator">-</span> <span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">completedOv</span> <span class="TextSegElementOperator">-</span> <span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Number of bytes read by request number %Iu is %d\n&quot;</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Number of bytes read by request number %Iu is %d\n&quot;</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">numberOfBytesTransferred</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">numberOfBytesTransferred</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ReadFile</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ReadFile</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">),</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">),</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">completedOv</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">completedOv</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">ERROR_IO_PENDING</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">ERROR_IO_PENDING</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%Iu th Read failed %d \n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%Iu th Read failed %d \n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span> <span class="TextSegElementKeyword">else</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">completedOv</span> <span class="TextSegElementOperator">-</span> <span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">completedOv</span> <span class="TextSegElementOperator">-</span> <span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Number of bytes written by request number %Iu is %d\n&quot;</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Number of bytes written by request number %Iu is %d\n&quot;</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">numberOfBytesTransferred</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">numberOfBytesTransferred</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">WriteFile</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">WriteFile</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">),</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">buf</span> <span class="TextSegElementOperator">+</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">),</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">BUFFER_SIZE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">completedOv</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">completedOv</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">ERROR_IO_PENDING</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementKeyword">error</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">ERROR_IO_PENDING</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%Iu th write failed %d \n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;%Iu th write failed %d \n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">Error</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDevice</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDevice</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hDevice</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hCompletionPort</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hCompletionPort</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hCompletionPort</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hCompletionPort</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pOvList</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buf</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">buf</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementKeyword">int</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementKeyword">int</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">_cdecl</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">_cdecl</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">main</span><span class="TextSegElementOperator">(</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">main</span><span class="TextSegElementOperator">(</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_</span> <span class="TextSegElementKeyword">int</span> <span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_reads_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">LPSTR</span>&nbsp; <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">argv</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">_In_reads_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">LPSTR</span>&nbsp; <span class="TextSegElementOperator">*</span><span class="TextSegElementIdentifier">argv</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">/*++</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Routine Description:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Entry point to rwbulk.exe</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Entry point to rwbulk.exe</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Parses cmdline, performs user-requested tests</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Parses cmdline, performs user-requested tests</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Arguments:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; argc, argv&nbsp; standard console&nbsp; 'c' app arguments</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; argc, argv&nbsp; standard console&nbsp; 'c' app arguments</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">Return Value:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Zero</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">&nbsp;&nbsp;&nbsp; Zero</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementComment">--*/</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">char</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">pinBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">char</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">pinBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">char</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">poutBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">char</span> <span class="TextSegElementOperator">*</span> <span class="TextSegElementIdentifier">poutBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">nBytesRead</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">nBytesRead</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">nBytesWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">nBytesWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span>&nbsp; &nbsp; <span class="TextSegElementIdentifier">ok</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span>&nbsp; &nbsp; <span class="TextSegElementIdentifier">ok</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span>&nbsp; &nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">int</span>&nbsp; &nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">UINT</span>&nbsp;&nbsp; <span class="TextSegElementIdentifier">success</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">UINT</span>&nbsp;&nbsp; <span class="TextSegElementIdentifier">success</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hRead</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hRead</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span> <span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">fail</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementIdentifier">L</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">fail</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementIdentifier">L</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">Parse</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">argv</span> <span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementIdentifier">Parse</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">argc</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">argv</span> <span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// dump USB configuation and pipe info</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// dump USB configuation and pipe info</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fDumpUsbConfig</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fDumpUsbConfig</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">DumpUsbConfig</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">DumpUsbConfig</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fPlayWithDevice</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fPlayWithDevice</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">PlayWithDevice</span><span class="TextSegElementOperator">();</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">PlayWithDevice</span><span class="TextSegElementOperator">();</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fPerformAsyncIo</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fPerformAsyncIo</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span>&nbsp; <span class="TextSegElementIdentifier">th1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">HANDLE</span>&nbsp; <span class="TextSegElementIdentifier">th1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Create a reader thread</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Create a reader thread</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">th1</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CreateThread</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Default Security Attrib.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">th1</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">CreateThread</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Default Security Attrib.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Initial Stack Size,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Initial Stack Size,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">AsyncIo</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Thread Func</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">AsyncIo</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Thread Func</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">LPVOID</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">READER_TYPE</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">LPVOID</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">READER_TYPE</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Creation Flags</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">,</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Creation Flags</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span> <span class="TextSegElementOperator">);</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Don't need the Thread Id.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">NULL</span> <span class="TextSegElementOperator">);</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementComment">// Don't need the Thread Id.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">th1</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">th1</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Couldn't create reader thread - error %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Couldn't create reader thread - error %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Use this thread for peforming write.</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// Use this thread for peforming write.</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">AsyncIo</span><span class="TextSegElementOperator">((</span><span class="TextSegElementIdentifier">PVOID</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">WRITER_TYPE</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">AsyncIo</span><span class="TextSegElementOperator">((</span><span class="TextSegElementIdentifier">PVOID</span><span class="TextSegElementOperator">)</span><span class="TextSegElementIdentifier">WRITER_TYPE</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// doing a read, write, or both test</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// doing a read, write, or both test</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">((</span><span class="TextSegElementIdentifier">G_fRead</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">||</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fWrite</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">((</span><span class="TextSegElementIdentifier">G_fRead</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">||</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fWrite</span><span class="TextSegElementOperator">))</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fRead</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fRead</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span> <span class="TextSegElementComment">// round size to sizeof ULONG for readable dumping</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span> <span class="TextSegElementComment">// round size to sizeof ULONG for readable dumping</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">while</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_ReadLen</span> % <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">while</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_ReadLen</span> % <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">++;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">++;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// open the output file</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// open the output file</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">hRead</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">hRead</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hRead</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hRead</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">pinBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">pinBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fWrite</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fWrite</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span> <span class="TextSegElementComment">// round size to sizeof ULONG for readable dumping</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span> <span class="TextSegElementComment">// round size to sizeof ULONG for readable dumping</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">while</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_WriteLen</span> % <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">while</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_WriteLen</span> % <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">++;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">++;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// open the output file</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// open the output file</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">OpenDevice</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">TRUE</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">poutBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">poutBuf</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">malloc</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">&lt;</span> <span class="TextSegElementIdentifier">G_IterationCount</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span> <span class="TextSegElementOperator">&lt;</span> <span class="TextSegElementIdentifier">G_IterationCount</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fWrite</span> <span class="TextSegElementOperator">&amp;&amp;</span> <span class="TextSegElementIdentifier">poutBuf</span> <span class="TextSegElementOperator">&amp;&amp;</span> <span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fWrite</span> <span class="TextSegElementOperator">&amp;&amp;</span> <span class="TextSegElementIdentifier">poutBuf</span> <span class="TextSegElementOperator">&amp;&amp;</span> <span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">PULONG</span> <span class="TextSegElementIdentifier">pOut</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PULONG</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">PULONG</span> <span class="TextSegElementIdentifier">pOut</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PULONG</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">numLongs</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">G_WriteLen</span> <span class="TextSegElementOperator">/</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ULONG</span>&nbsp; <span class="TextSegElementIdentifier">numLongs</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">G_WriteLen</span> <span class="TextSegElementOperator">/</span> <span class="TextSegElementKeyword">sizeof</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">ULONG</span> <span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// put some data in the output buffer</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// put some data in the output buffer</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">=</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">numLongs</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">for</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">=</span><span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">&lt;</span><span class="TextSegElementIdentifier">numLongs</span><span class="TextSegElementOperator">;</span> <span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">++)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">*(</span><span class="TextSegElementIdentifier">pOut</span><span class="TextSegElementOperator">+</span><span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">*(</span><span class="TextSegElementIdentifier">pOut</span><span class="TextSegElementOperator">+</span><span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">j</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// send the write</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// send the write</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">success</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">WriteFile</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">nBytesWrite</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">success</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">WriteFile</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">nBytesWrite</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">success</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">success</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;WriteFile failed - error %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;WriteFile failed - error %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Write (%04.4u) : request %06.6u bytes -- %06.6u bytes written\n&quot;</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Write (%04.4u) : request %06.6u bytes -- %06.6u bytes written\n&quot;</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesWrite</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesWrite</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">nBytesWrite</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">nBytesWrite</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fRead</span> <span class="TextSegElementOperator">&amp;&amp;</span> <span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fRead</span> <span class="TextSegElementOperator">&amp;&amp;</span> <span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">success</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">ReadFile</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hRead</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">nBytesRead</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">success</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">ReadFile</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hRead</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementOperator">&amp;</span><span class="TextSegElementIdentifier">nBytesRead</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">success</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">success</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementNumber">0</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;ReadFile failed - error %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;ReadFile failed - error %d\n&quot;</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">GetLastError</span><span class="TextSegElementOperator">());</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">retValue</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">goto</span> <span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Read (%04.4u) : request %06.6u bytes -- %06.6u bytes read\n&quot;</span><span class="TextSegElementOperator">,</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Read (%04.4u) : request %06.6u bytes -- %06.6u bytes read\n&quot;</span><span class="TextSegElementOperator">,</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesRead</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="TextSegElementIdentifier">i</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesRead</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fWrite</span> <span class="TextSegElementOperator">&amp;&amp;</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_fWrite</span> <span class="TextSegElementOperator">&amp;&amp;</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// validate the input buffer against what</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// validate the input buffer against what</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// we sent to the 82930 (loopback test)</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">// we sent to the 82930 (loopback test)</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementComment">//</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ok</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">Compare_Buffs</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesRead</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesWrite</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">ok</span> <span class="TextSegElementOperator">=</span> <span class="TextSegElementIdentifier">Compare_Buffs</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesRead</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesWrite</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementIdentifier">G_fDumpReadData</span> <span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Dumping read buffer\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Dumping read buffer\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Dump</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PUCHAR</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">,</span>&nbsp; <span class="TextSegElementIdentifier">nBytesRead</span> <span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Dump</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PUCHAR</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">,</span>&nbsp; <span class="TextSegElementIdentifier">nBytesRead</span> <span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Dumping write buffer\n&quot;</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">printf</span><span class="TextSegElementOperator">(</span><span class="TextSegElementString">&quot;Dumping write buffer\n&quot;</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Dump</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PUCHAR</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesRead</span> <span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">Dump</span><span class="TextSegElementOperator">(</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">PUCHAR</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">,</span> <span class="TextSegElementIdentifier">nBytesRead</span> <span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ok</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ok</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ok</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementKeyword">if</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">ok</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementNumber">1</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">fail</span><span class="TextSegElementOperator">++;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">fail</span><span class="TextSegElementOperator">++;</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_ReadLen</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">G_ReadLen</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">G_WriteLen</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">nBytesRead</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">assert</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">nBytesRead</span> <span class="TextSegElementOperator">==</span> <span class="TextSegElementIdentifier">G_ReadLen</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame"><span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">:</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementIdentifier">exit</span><span class="TextSegElementOperator">:</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">pinBuf</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">free</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">poutBuf</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// close devices if needed</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementComment">// close devices if needed</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hRead</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hRead</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hRead</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hRead</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">if</span> <span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">INVALID_HANDLE_VALUE</span><span class="TextSegElementOperator">)</span> <span class="TextSegElementOperator">{</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">_Analysis_assume_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">_Analysis_assume_</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span> <span class="TextSegElementOperator">!=</span> <span class="TextSegElementIdentifier">NULL</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span><span class="TextSegElementOperator">);</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span class="TextSegElementIdentifier">CloseHandle</span><span class="TextSegElementOperator">(</span><span class="TextSegElementIdentifier">hWrite</span><span class="TextSegElementOperator">);</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementOperator">}</span></td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;</td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;</td>
</tr>
<tr class="SectionMiddle">
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">retValue</span><span class="TextSegElementOperator">;</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame">&nbsp;&nbsp;&nbsp; <span class="TextSegElementKeyword">return</span> <span class="TextSegElementIdentifier">retValue</span><span class="TextSegElementOperator">;</span></td>
</tr>
<tr class="SectionEnd">
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
<td class="AlignCenter">&nbsp;</td>
<td class="TextItemSame"><span class="TextSegElementOperator">}</span></td>
</tr>
</table>
<br>
</body>
</html>
